package com.action.gulimall.cart.feign;

import com.action.common.utils.R;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestParam;

import java.math.BigDecimal;

/**
 * @author sl shilun217@qq.com
 * @Deacription 产品feign服务
 * @date 2021/06/29/15:17
 **/
@FeignClient("gulimall-product")
public interface ProductFeignService {

    /** @Author sl
     * @Description 根据skuId获取sku信息
     * @Date 15:37 2021/6/29/029
     * @Param skuId
     * @return R
     **/
    @GetMapping("/product/skuinfo/info/{skuId}")
    R getSkuInfo(@RequestParam("skuId") Long skuId);

    /** @Author sl
     * @Description 根据skuId获取sku销售属性组合
     * @Date 15:37 2021/6/29/029
     * @Param skuId
     * @return R
     **/
    @GetMapping("/product/skusaleattrvalue/stringList/{skuId}")
    R getSkuAttrValues(@RequestParam("skuId") Long skuId);

    @GetMapping(value = "/product/skuinfo/{skuId}/price")
    R getPrice(@PathVariable("skuId") Long skuId);
}
